using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Services : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string controlName = "";
        string id = Request.QueryString["id"];

        if ("001".Equals(id, StringComparison.OrdinalIgnoreCase))
        {
            controlName = "Sites/"+ NTTHAO.CommonWeb.WebGlobal.GetSite().SiteID +"/Webparts/User/CheckAccount.ascx";
        } 
        else if ("002".Equals(id, StringComparison.OrdinalIgnoreCase))
        {
            controlName = "Sites/" + NTTHAO.CommonWeb.WebGlobal.GetSite().SiteID + "/Webparts/User/Login.ascx";
        }
        else if ("003".Equals(id, StringComparison.OrdinalIgnoreCase))
        {
            controlName = "Sites/" + NTTHAO.CommonWeb.WebGlobal.GetSite().SiteID + "/Webparts/User/Register.ascx";
        }
        else if ("004".Equals(id, StringComparison.OrdinalIgnoreCase))
        {
            controlName = "Sites/" + NTTHAO.CommonWeb.WebGlobal.GetSite().SiteID + "/Webparts/Pages/AddQuestion.ascx";
        }

        if (controlName == string.Empty)
        {
            Response.Write("No service found.");
        }
        else
        {
            try
            {
                this.Controls.Add(this.LoadControl(controlName));
            }
            catch (Exception ex) { Response.Write(ex.Message); }
        }
    }
}
